package com.tbsoft.ehr.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
/**
 * @desc 简历实体
 * @author vastdream
 *
 */
@Entity
@Table(name="EHR_RESUME")
public class Resume extends BaseEntity {
	/**
	 * 主键
	 */
	private String id;
	/**
	 * 姓名
	 */
	private String name;
	/**
	 * 岗位
	 */
	private String post;
	/**
	 * 性别
	 */
	private String sex;
	/**
	 * 出生日期
	 */
	private Date birtyday;
	/**
	 * 籍贯
	 */
	private String hometown;
	/**
	 * 邮箱
	 */
	private String email;
	/**
	 * 联系方式
	 */
	private String phone;
	/**
	 * 毕业时间
	 */
	private Date graduationTime;
	/**
	 * 毕业院校
	 */
	private String university;
	/**
	 * 学历(10:初中,20:高中,30:中技,40:中专50:大专,60:本科70:硕土,80:博士)
	 */
	private String educationLevel;

	/**
	 * 专业
	 */
	private String specialty;
	/**
	 * 职业特点
	 */
	private String occupationalCharacteristics;
	/**
	 * IT技术专长
	 */
	private String technicalExpertise;
	/**
	 * 自我评价
	 */
	private String selfEvaluation;
	
	/**
	 * 用户id
	 */
	private String userId;
	
	/**
	 * 项目经验
	 */
	private List<ProjectExperience> projectExperienceList = new ArrayList<ProjectExperience>();
	@Id
	@GeneratedValue(generator="system-uuid")
	@GenericGenerator(name="system-uuid", strategy = "uuid")
	@Column(name="RESUME_ID",length=32)
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	@Column(name="NAME",length=30)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name="POST",length=45)
	public String getPost() {
		return post;
	}
	public void setPost(String post) {
		this.post = post;
	}
	@Column(name="SEX",length=1)
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	@Column(name="BIRTYDAY")
	public Date getBirtyday() {
		return birtyday;
	}
	public void setBirtyday(Date birtyday) {
		this.birtyday = birtyday;
	}
	@Column(name="HOME_TOWN",length=150)
	public String getHometown() {
		return hometown;
	}
	public void setHometown(String hometown) {
		this.hometown = hometown;
	}
	@Column(name="EMAIL",length=50)
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name="PHONE",length=15)
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@Column(name="GRADUATION_TIME")
	public Date getGraduationTime() {
		return graduationTime;
	}
	public void setGraduationTime(Date graduationTime) {
		this.graduationTime = graduationTime;
	}
	@Column(name="UNIVERSITY",length=150)
	public String getUniversity() {
		return university;
	}
	public void setUniversity(String university) {
		this.university = university;
	}
	@Column(name="SPECIALTY",length=150)
	public String getSpecialty() {
		return specialty;
	}
	public void setSpecialty(String specialty) {
		this.specialty = specialty;
	}
	@Column(name="OCCUPATIONAL_CHARACTERISTICS",length=1500)
	public String getOccupationalCharacteristics() {
		return occupationalCharacteristics;
	}
	public void setOccupationalCharacteristics(String occupationalCharacteristics) {
		this.occupationalCharacteristics = occupationalCharacteristics;
	}
	@Column(name="TECHNICAL_EXPERTISE",length=1500)
	public String getTechnicalExpertise() {
		return technicalExpertise;
	}
	public void setTechnicalExpertise(String technicalExpertise) {
		this.technicalExpertise = technicalExpertise;
	}
	@Column(name="EDUCATION_LEVEL",length=2)
	public String getEducationLevel() {
		return educationLevel;
	}
	public void setEducationLevel(String educationLevel) {
		this.educationLevel = educationLevel;
	}
	@Column(name="SELF_EVALUATION",length=1500)
	public String getSelfEvaluation() {
		return selfEvaluation;
	}
	
	public void setSelfEvaluation(String selfEvaluation) {
		this.selfEvaluation = selfEvaluation;
	}
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
	@JoinColumn(name="RESUME_ID")
	public List<ProjectExperience> getProjectExperienceList() {
		return projectExperienceList;
	}
	public void setProjectExperienceList(
			List<ProjectExperience> projectExperienceList) {
		this.projectExperienceList = projectExperienceList;
	}
	
	@Column(name="USER_ID",length=50,updatable=false)
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}	
	/**
	 * 面试结果
	 */
	private String interviewStatus;
	/**
	 * 联络日期
	 */
	private Date contactDate;
	/**
	 * 面试结果备注
	 */
	private String interviewComments;
	
	@Column(name="CONTACT_DATE")
	public Date getContactDate() {
		return contactDate;
	}
	public void setContactDate(Date contactDate) {
		this.contactDate = contactDate;
	}
	@Column(name="INTERVIEW_STATUS")
	public String getInterviewStatus() {
		return interviewStatus;
	}
	public void setInterviewStatus(String interviewStatus) {
		this.interviewStatus = interviewStatus;
	}
	@Column(name="INTERVIEW_COMMENTS")
	public String getInterviewComments() {
		return interviewComments;
	}
	public void setInterviewComments(String interviewComments) {
		this.interviewComments = interviewComments;
	}
	
	
	
}
